/*
 * Created on Feb 19, 2004
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package ModuleBuilder.model;

import java.util.*;
import java.io.*;

import ModuleBuilder.UI.tree.*;
/**
 * @author Milton  Soong
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 * 
 * This class handles all the data for a particular UnitTemplate, and is the 
 * Model for the UnitTemplateEditor View
 */
public class UnitProfileModel extends GameModel implements Serializable {

	private ArrayList attributes;	// holds all the attributes (use ArrayList because we want to maintain order)	
	/**
	 * 
	 */
//	public UnitTypeGameTreeNode() {
//		super(null, null, false, null);
//		attributes = new ArrayList();
//	}
//	
	public UnitProfileModel(String nameIn, String editorIn, boolean isEditorIn, iEditorPanel edIn) {
		super( nameIn, editorIn, isEditorIn, edIn );
		attributes = new ArrayList();
	}
		
	public void addAttribute( UnitProfileAttribute valIn ) {
		attributes.add(valIn);
	}
	
	public void removeAllAttributes() {
		attributes.clear();	
	}	
	/**
	 * @return
	 */
	public ArrayList getAttributes() {
		return attributes;
	}

	/**
	 * @param attributes The attributes to set.
	 */
	public void setAttributes(ArrayList attributes) {
		this.attributes = attributes;
	}

}
